package com.neusoft.his.sb.entity;

import java.util.Date;

public class Dept {
	
//	private static String prefix;
	private static int INDEX= 0;
	private Integer deptno ;
	private String dname;
	private String loc;
	
	static {
//		静态代码块
//		在.class文件读入到内存以后，文件中的静态代码块将
//		自动执行一次且仅一次
		INDEX =  (int) new Date().getTime();
	}
	
	public Dept() {
		INDEX++;
		this.deptno = INDEX;
	}
	
	public Integer getDeptno() {
		return deptno;
	}
	public void setDeptno(Integer deptno) {
		this.deptno = deptno;
	}
	public String getDname() {
		return dname;
	}
	public void setDname(String dname) {
		this.dname = dname;
	}
	public String getLoc() {
		return loc;
	}
	public void setLoc(String loc) {
		this.loc = loc;
		  
	}
	@Override
	public String toString() {
		return "Dept [deptno=" + deptno + ", dname=" + dname + ", loc=" + loc + "]";
	}
	
	
	
}
